package com.huqing.icu.base.redis.client;

import com.huqing.icu.base.redis.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

/**
 * @Description Redis单机客户端，线上都是集群，但是本地联调一般都是单机
 * @Author huqing
 * @Date 2025/1/6 10:11
 **/
@Component
public class SingleRedisClient {

    @Autowired
    private JedisPool jedisPool;

    private SingleRedisClient() {
    }

    public Jedis getJedis() {
        Jedis jedis = RedisUtils.getRedis(jedisPool);
        return jedis;
    }
}
